﻿using System;
using System.Collections.Generic;
using LiveTiss.Classes;

namespace LiveTiss.Schemas
{
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.ans.gov.br/padroes/tiss/schemas")]
    public partial class ct_atendimentoOdontologia
    {
        #region Public Properties - Custom

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public DateTime? _dataTerminoTratamento
        {
            get
            {
                if (dataTerminoTratamentoField > Util.EmptyDate && dataTerminoTratamentoFieldSpecified)
                    return this.dataTerminoTratamentoField;
                else
                    return null;
            }
            set
            {
                if (value.HasValue)
                {
                    dataTerminoTratamentoFieldSpecified = true;
                    if ((object.ReferenceEquals(this.dataTerminoTratamentoField, value.Value) != true))
                    {
                        this.dataTerminoTratamentoField = value.Value;
                        this.OnPropertyChanged("dataTerminoTratamento");
                    }
                }
                else
                {
                    dataTerminoTratamentoFieldSpecified = false;
                    if ((object.ReferenceEquals(this.dataTerminoTratamentoField, Util.EmptyDate) != true))
                    {
                        this.dataTerminoTratamentoField = Util.EmptyDate;
                        this.OnPropertyChanged("dataTerminoTratamento");
                    }
                }
            }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public List<KeyValuePair<string, string>> atendimentoOdontoItems
        {
            get
            {
                return XML_enum.AtendimentoOdonto;
            }
        }

        #endregion
    }
}
